<template>
  <view class="root fs-32">
    <text
      :style="{
        margin: `30rpx 30rpx 150rpx`,
        whiteSpace: `normal`,
        wordWrap: `break-word`,
      }"
    >
      {{ content }}
    </text>
    <!-- #ifdef APP_PLUS -->
    <view
      :style="{ transform: 'translateX(-50%)', left: `50%` }"
      class="fixed bottom-88 ai-center"
    >
      <text
        v-if="version"
        :style="{ color: `#999`, marginBottom: `30rpx` }"
        class="fs-26"
      >
        version: {{ version }}
      </text>

      <navigator
        class="fs-22"
        hover-class="tap-hover"
        hover-start-time="50"
        :style="{ color: `#4388e7` }"
        :url="`/pages/webview?url=${encodeURIComponent(
          SERVER_URL + '/private.html'
        )}`"
      >
        隐私政策
      </navigator>
      <navigator
        class="fs-22"
        hover-class="tap-hover"
        :style="{ color: `#4388e7` }"
        :url="`/pages/webview?url=${encodeURIComponent(
          SERVER_URL + '/protocol.html'
        )}`"
      >
        用户使用协议
      </navigator>
    </view>
    <!-- #endif -->
  </view>
</template>

<script>
  let version = "";
  // #ifdef APP-PLUS
  version = plus?.runtime?.version;
  // #endif

  export default {
    data: () => ({
      content: "",
      version,
      SERVER_URL: uni.REQUEST_URL,
    }),
    onLoad() {
      uni.fetch("/api/login/about", {
        success: (res) => (this.content = res),
      });
    },
    methods: {},
  };
</script>